home *** CD-ROM | disk | FTP | other *** search
/ mail.altrad.com / 2015.02.mail.altrad.com.tar / mail.altrad.com / TEST / office deutch / INFOPATH.NL-NL / INFLR.CAB / FL_SendAnEmail_snippet_142597_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8 < prev    next >
Extensible Markup Language  |  2005-10-28  |  2KB  |  48 lines

  1. <?xml version="1.0"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3.   <CodeSnippet Format="1.0.0">
  4.     <Header>
  5.       <Title>Create an E-Mail Message </Title>
  6.       <Author>Microsoft Corporation</Author>
  7.       <Description>Uses the MailMessage class to send an e-mail message.</Description>
  8.       <Shortcut>conEmail</Shortcut>
  9.     </Header>
  10.     <Snippet>
  11.       <Imports>
  12.         <Import>
  13.           <Namespace>System.Net.Mail</Namespace>
  14.         </Import>
  15.       </Imports>
  16.       <Declarations>
  17.         <Literal>
  18.           <ID>recipient</ID>
  19.           <ToolTip>Replace with the e-mail address of the recipient of the e-mail.</ToolTip>
  20.           <Default>"from@address"</Default>
  21.         </Literal>
  22.         <Literal>
  23.           <ID>sender</ID>
  24.           <ToolTip>Replace with the e-mail address of the sender.</ToolTip>
  25.           <Default>"sender@address"</Default>
  26.         </Literal>
  27.         <Literal>
  28.           <ID>message</ID>
  29.           <ToolTip>Replace with the text of the message.</ToolTip>
  30.           <Default>"Message Text"</Default>
  31.         </Literal>
  32.         <Literal>
  33.           <ID>subject</ID>
  34.           <ToolTip>Replace with the contents of the subject line for the e-mail.</ToolTip>
  35.           <Default>"Subject"</Default>
  36.         </Literal>
  37.         <Literal>
  38.           <ID>serverName</ID>
  39.           <ToolTip>Replace with the name of the SMTP server.</ToolTip>
  40.           <Default>"Email Server Name"</Default>
  41.         </Literal>
  42.       </Declarations>
  43.       <Code Language="VB" Kind="method body"><![CDATA[Dim message As New MailMessage($sender$, $recipient$, $subject$, $message$)
  44. Dim emailClient As New SmtpClient($serverName$)
  45. emailClient.Send(message)]]></Code>
  46.     </Snippet>
  47.   </CodeSnippet>
  48. </CodeSnippets>